﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Purchaseslist.aspx.cs" Inherits="Automobile.service.UI.Purchaseslist" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="lib/html5.js"></script>
    <script type="text/javascript" src="lib/respond.min.js"></script>
    <script type="text/javascript" src="lib/PIE_IE678.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="css/H-ui.admin.css" />
    <link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="lib/icheck/icheck.css" />

    <!--[if IE 6]>
    <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>采购订单列表</title>
</head>
<body>
    <form runat="server">
        <!--top 导航-->
        <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 采购管理 <span class="c-gray en">&gt;</span> 订单列表 <a class="btn btn-success radius r" style="line-height: 1.6em; margin-top: 3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>

        <div class="page-container">
            <div class="cl pd-5 bg-1 bk-gray mt-20">
                <span class="l">日期范围：
		<input type="text" runat="server" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width: 120px;">
                    -
		<input type="text" runat="server" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d'})" id="datemax" class="input-text Wdate" style="width: 120px;">
                    <%-- <input type="text" name="" id="" placeholder="请输入报告名称查询" style="width: 250px" class="input-text">--%>
                    <button class="btn btn-success" type="submit" runat="server" onserverclick="Unnamed_ServerClick"><i class="Hui-iconfont">&#xe665;</i> 查询</button>
                </span>
                <span class="r">共有数据：<strong><asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></strong> 条</span>
            </div>
            <div class="mt-20">
                <asp:Repeater ID="Repeater1" runat="server">
                    <HeaderTemplate>
                        <table class="table table-border table-bordered table-bg">
                            <thead>
                                <tr class="text-c">

                                    <th width="40">订单编号</th>
                                    <th width="100">下单日期</th>
                                    <th width="60">订单状态</th>
                                    <th width="70">供货商</th>
                                    <th width="90">仓库</th>
                                    <th width="80">下单人</th>
                                    <th width="80">订单类型</th>
                                    <th width="70">审核</th>
                                </tr>
                            </thead>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tbody id="mybody">
                            <tr class="text-c">

                                <td><%#Eval("Purchase_Id") %></td>
                                <td><%#Eval("Purchase_date") %></td>
                                <td><%#Convert.ToInt32(Eval("Purchase_State"))==0?"已处理":"未处理" %></td>
                                <td><%#Eval("Supplier_Name") %></td>
                                <td><%#Eval("WareHose_Name") %></td>
                                <td><%#Eval("Employee_Name") %></td>
                                <td><%#Convert.ToInt32(Eval("Purchase_Type_State"))==0?"采购":"退货" %></td>      
                                <td><a href="PurchasesMate.aspx?id=<%#Eval("Purchase_Id") %>">审核</a></td>
                            </tr>
                        </tbody>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged"></webdiyer:AspNetPager>
            </div>
        </div>
        <script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
        <script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script>
        <script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
        <script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
        <script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
        <script type="text/javascript" src="js/H-ui.js"></script>
        <script type="text/javascript" src="js/H-ui.admin.js"></script>
        <!--域名配置-->
        <script type="text/javascript" src="static/WebApi.js"></script>
        <script type="text/javascript">
            /*
                参数解释：
                title	标题
                url		请求的url
                id		需要操作的数据id
                w		弹出层宽度（缺省调默认值）
                h		弹出层高度（缺省调默认值）
            */
            /*员工-增加*/
            function admin_add(title, url, w, h) {
                //parent.layer_show(title, url, w, h);
                var index = layer.open({
                    type: 2,
                    title: title,
                    content: url
                });
                layer.full(index);
            }
            /*员工-删除*/
            function admin_del(obj, id) {
                parent.layer.confirm('确认要删除吗？', function (index) {
                    //此处请求后台程序，下方是成功后的前台处理……

                    $(obj).parents("tr").remove();
                    parent.layer.msg('已删除!', { icon: 1, time: 1000 });
                });
            }
            /*员工-编辑*/
            function admin_edit(title, url, id, w, h) {
                parent.layer_show(title, url, w, h);
            }
            /*员工-停用*/
            function admin_stop(obj, id) {
                parent.layer.confirm('确认要停用吗？', function (index) {
                    //此处请求后台程序，下方是成功后的前台处理……

                    $(obj).parents("tr").find(".td-manage").prepend('<a onClick="admin_start(this,id)" href="javascript:;" title="启用" style="text-decoration:none"><i class="Hui-iconfont">&#xe615;</i></a>');
                    $(obj).parents("tr").find(".td-status").html('<span class="label label-default radius">已禁用</span>');
                    $(obj).remove();
                    parent.layer.msg('已停用!', { icon: 5, time: 1000 });
                });
            }

            /*员工-启用*/
            function admin_start(obj, id) {
                parent.layer.confirm('确认要启用吗？', function (index) {
                    //此处请求后台程序，下方是成功后的前台处理……


                    $(obj).parents("tr").find(".td-manage").prepend('<a onClick="admin_stop(this,id)" href="javascript:;" title="停用" style="text-decoration:none"><i class="Hui-iconfont">&#xe631;</i></a>');
                    $(obj).parents("tr").find(".td-status").html('<span class="label label-success radius">已启用</span>');
                    $(obj).remove();
                    parent.layer.msg('已启用!', { icon: 6, time: 1000 });
                });
            }
        </script>
    </form>
</body>
</html>

